//package cn.crap.mobile.cahe;
//
//import java.util.Set;
//
//import org.apache.log4j.Logger;
//
//public class ImplRedisTempClient extends CacheClientBase {
//	private static Logger log = Logger.getLogger(ImplRedisTempClient.class);
//
//	public ImplRedisTempClient() {
//		try {
//			super.readJedisFactory = RedisTempReadInit.getSingletonInstance();
//			super.readJedis = super.readJedisFactory.getJedisInstance();
//			super.writeJedisFactory = RedisTempWriteInit.getSingletonInstance();
//			super.writeJedis = super.writeJedisFactory.getJedisInstance();
//		} catch (Exception ex) {
//			log.error("redis error:", ex);
//			if (super.readJedisFactory != null) {
//				super.readJedisFactory.reset();
//			}
//			if (super.writeJedisFactory != null) {
//				super.writeJedisFactory.reset();
//			}
//		}
//	}
//	public static void main(String[] args){
//		ICacheClient tempClient = new ImplRedisTempClient();
////		System.out.println(tempClient.scard("online_users"));
////		Set<String> keys = tempClient.keys("online_1047563");
////		System.out.println("aa:"+tempClient.hgetAll("online_1047563"));
//		Set<String> smembers = tempClient.smembers("online_users");
//		int i = 0;
//		for (String string : smembers) {
//			String hget = tempClient.hget(string, "SEXUAL");
//			if("2".equals(hget)){
//				i++;
//			}
//		}
//		System.out.println(smembers.size());
//		System.out.println(i);
//		tempClient.release();
//	}
//}
